<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
<%@include file="/commons/commonList.jsp" %>
<script type="text/javascript">
	function resize(){
		parent.window.document.all('noteIfm').style.height=document.body.scrollHeight;
	}
	function init(){
		resize();
		parent.orderStr = '${orderStr}';
		parent.totalRows='${totalRows}';
	}

	/************************************************************/
	function openDetailPage(noteId){
		var url = "${ctx}/charge_noteAction.do?method=initNoteDetail&flag=0&noteId="+noteId;
   		top.windowOpen(url, "noteDetail", "详细资料", 580, 810,true,"noteDetailIfm");
   	}

   	function getNoteIds(){
		return getSelectIds();
   	}

</script>
</head>
<body onload="init();">
<div style="overflow:auto;">
	<ec:ceTable items="noteList"
				autoIncludeParameters="true"
				var="noteItem"
				action="${ctx}/charge_noteAction.do?method=list"
				rowsDisplayed="15"
				width="100%"
				view="pmsview"
				sortable="false"
				styleClass="gridData"
			>
		<ec:ceRow id="${noteItem.noteId}" styleClass="grid" onclick="parent.currenNoteId='${noteItem.noteId}';
											 parent.currentPeriodId='${noteItem.periodId}'
											 parent.currentHouseId='${noteItem.houseId}';
											 parent.currentHouseNumber='${noteItem.houseName}';
											 parent.currentStatus='${noteItem.validity}'"
									onContextMenu="return ShowContextMenu(event,'quick_rightmenu');"
									ondblclick="parent.currenNoteId='${noteItem.noteId}';
											 parent.currentPeriodId='${noteItem.periodId}';
											 parent.currentHouseId='${noteItem.houseId}';
											 parent.currentHouseNumber='${noteItem.houseName}';
											 parent.currentStatus='${noteItem.validity}';
											 openDetailPage('${noteItem.noteId}');"
									>
			<ec:ceColumn property="buildingName" headerCell="pmsHeadrCell" width="10%" title="${key.charge_note_list_building}" sortable="true"/>
			<ec:ceColumn property="houseName" headerCell="pmsHeadrCell"   width="10%" title="${key.charge_note_list_houseNumber}" sortable="true"/>
			<ec:ceColumn property="period" headerCell="pmsHeadrCell"   width="15%" title="${key.charge_note_list_period}" sortable="true"/>
			<ec:ceColumn property="requisitionNum" headerCell="pmsHeadrCell" width="15%" title="${key.charge_note_list_noteNumber}"/>
			<ec:ceColumn property="totalAmt" headerCell="pmsHeadrCell"   width="10%" title="${key.charge_note_list_amt}"
						 styleClass="align_right"
						 headerOnmouseout="this.className='align_right'"
						 headerOnmouseover="this.className='grid_sort_on align_right'"/>
			<ec:ceColumn property="validityStr" headerCell="pmsHeadrCell"   width="10%" title="${key.charge_note_list_status}"/>
		</ec:ceRow>
	</ec:ceTable>
</div>

	<c:if test="${fn:length(noteList) > 0 }">
		<script type="text/javascript">
			parent.noteButtonState("1");
		</script>
	</c:if>

	<c:if test="${fn:length(noteList) == 0 }">
		<script type="text/javascript">
			parent.noteButtonState("2");
		</script>
	</c:if>

<div id="quick_rightmenu" style="display:none;"
	 oncontextmenu="return false"
	 class="quick_rightmenu">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
    <tr>
      <td>
      	<table width="100%" border="0" cellpadding="2" cellspacing="0">
	         <pms:AuthTag authName="menu.nopage.common.buildNotesAnew.one">
	        <tr>
	          <td class="quickMenu_toolbarico">
	          		<a href="#"  onclick="parent.openBuildAnewForOne();" onfocus="this.blur()">
						<img src="${ctx}/images/ico_charge_cxsc.gif" alt="${key.charge_note_list_menu_buildNew}" width="16" height="16" border="0" align="absbottom"/>&nbsp;${key.charge_note_list_menu_buildNew}
					</a>
			  </td>
	        </tr>

		<tr>
		   <td class="hrpading">
		       <table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     		<tr><td class="quickMenu_line"></td></tr>
		     	</table>
		   </td>
		</tr>
		 </pms:AuthTag>
		<tr>
          <td class="quickMenu_toolbarico">
          	<a href="#" onclick="parent.openPrintSingleton(this);" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_printer.gif" alt="${key.charge_note_list_menu_print}" width="16" height="16" border="0" align="absbottom">${key.charge_note_list_menu_print}
          	</a>
          </td>
        </tr>


        <tr>
		   <td class="hrpading">
		       <table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     		<tr><td class="quickMenu_line"></td></tr>
		     	</table>
		   </td>
		</tr>
		<tr>
          <td class="quickMenu_toolbarico">
          	<a href="#" onclick="parent.printMeterdatas(this);" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_printer.gif" alt="走表数据明细" width="16" height="16" border="0" align="absbottom">走表数据明细
          	</a>
          </td>
        </tr>

      </table></td>
    </tr>
  </table>
 <script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==1){
	div1.innerHTML="";
	}
</script>
</div>
</body>
</html>